import { createFeatureSelector, createSelector } from "@ngrx/store";
import { AppState } from "..";
import { counterFeatureKey, State } from "../reducers/counter.reducer";

export const selectorCounter = createFeatureSelector<AppState, State>(
  counterFeatureKey
);

export const selectorCount = createSelector(
  selectorCounter,
  (state) => state.count
);
